Skip to content

bugc: give a caller's call JUMP the invoke's arguments - #354

Closed
gnidan wants to merge 1 commit into
mainfrom
bugc-call-jump-arguments
Closed

gnidan wants to merge 1 commit into
mainfrom
bugc-call-jump-arguments

Conversation

@gnidan

@gnidan gnidan commented Oct 7, 2026

Copy link
Copy Markdown
Member

bugc puts an internal call's invoke on two instructions: the caller's JUMP and the callee's entry JUMPDEST. Only the JUMPDEST's copy had arguments. Contexts are postconditions, so a debugger opens the callee's frame on the step after the JUMP, which is the JUMPDEST step, and there the frame had no arguments. They showed up one step later.

The JUMP leaves the arguments on the stack in the same slots the JUMPDEST describes (the JUMPDEST does not change the stack), so the JUMP's invoke now has the same arguments pointer. Both sites build it from one helper, invokeArguments.

call-contexts.test.ts asserted that the caller JUMP has no arguments. That assertion now expects the pointer group, and a new test reads the JUMP's argument pointers against the trace state after the JUMP to check that they give the values passed.

The tail-call back-edge JUMP still has no arguments. This change does not touch it.

@gnidan
gnidan force-pushed the bugc-call-jump-arguments branch from 8d95f1f to a7bcb21 Compare October 7, 2026 01:31
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-07 03:12 UTC

@gnidan

gnidan commented Oct 7, 2026

Copy link
Copy Markdown
Member Author

Included in #368.

@gnidan gnidan closed this Oct 7, 2026
@gnidan
gnidan deleted the bugc-call-jump-arguments branch October 7, 2026 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant